Additionally support Postgis Geography codec under one generic PostgisCodec - #727
Additionally support Postgis Geography codec under one generic PostgisCodec#727mdedetrich wants to merge 1 commit into
Conversation
3ec52e3 to
64f447d
Compare
8d0e343 to
548ad38
Compare
|
After realizing an issue with this implementation, specifically that encoding an object using Given that, I opted for a design that is more semantically correct, i.e. treat This did require touching some other internals i.e. |
f0937db to
f03ef79
Compare
f03ef79 to
8493054
Compare
Make sure that:
Issue description
Resolves: #528
New Public APIs
PostgisGeographyCodec(if this counts as an API).Additional context
Note that the implementation does have a fair bit of boilerplate due to
PostgisGeographyCodecbeing final and hence not being able to be subclassed. One alternative would be to have a package private implementation that bothPostgisGeographyCodecandPostgisGeometryCodeccan share (that way bothPostgisGeographyCodecandPostgisGeometryCodeccan be final).As suggested in the linked github issue, the implementation is just a copy paste of
PostgisGeometryCodecthat also uses theorg.locationtech.jts.geom.Geometrybut this allows you to decode postgresgeographytypes.